L1 loss

A loss function that calculates the absolute value of the difference between actual label values and the values that a model predicts. L1 loss is less sensitive to outliers than L2 loss.1

L1loss=i=0nyiy^iL_1 loss = \sum_{i=0}^{n} | y_i - \hat{y}_i |

where:

  • nn is the number of examples.
  • yy is the actual value of the label.
  • y^\hat{y} is the value that the model predicts for yy.

See also

Footnotes

  1. developers.google.com/machine-learning/glossary#l1-loss

2024 © ak